function  extractionImg(){
    $.ajax({
        type:"POST",
        url:"/ExtractionImg",
        data:{
            imgName:$('#textUpload').val()
        },
        success:function (message) {
           var json =  $.parseJSON(message);
           var code = json.code;

           if(code == 0) {
               $('.file-msg').text("识别成功");
               $('.file-msg').css("color", "#66CD00");
               $('#content').val(json.message);
           }
            if(code == 1) {
                $('.file-msg').text("识别失败"+json.message);
                $('.file-msg').css("color", "#FF0000");
            }
        }
    })
}

function upload() {
    $('#upload').ajaxSubmit(function (message) {
            var message1 = $.parseJSON(message);
            if (message1.code == 0) {
                $('#textUpload').val(message1.message);
                $('.file-msg').text("上传成功");
                $('.file-msg').css("color", "#66CD00");
            } else {
                $('.file-msg').text("上传失败");
                $('.file-msg').css("color", "#FF0000");
            }
        }
    )
}